import React, {Component} from 'react';
import {Router, Switch, Route} from 'react-router';

import LoginLayout from './layout/UserLayout';
import CommonLayout from './layout/CommonLayout';

class AppRouter extends Component {

    render() {
        return (
            <Router history={this.props.history}>
                <Switch>
                    <Route path="/user" render={props => <LoginLayout {...props} />}/>
                    <Route path="/" render={props => <CommonLayout {...props} />}/>
                </Switch>
            </Router>
        );
    }
}

export default AppRouter;
